package com.supreme.nettyapp.generalclient.controller;

import com.supreme.nettyapp.generalclient.mqttclient.service.MqttClientService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "netty")
public class NettyController {

    @Resource
    private MqttClientService mqttClientService;

    @GetMapping(value = "hello")
    public String hello() {
        return "hello";
    }

    @GetMapping(value = "startup")
    public String startup() {
        mqttClientService.startNettyClient();
        return "success";
    }
}
